
'''将测试结果写入文件的模块'''
class Write():

    def write_results_failed(self,param):
        with open('D:\\workspace\\our_first_project\\test_results.txt', 'a+') as file:
            file.write('--------------------------\n'
                       '     case %s failed\n'
                       '--------------------------\n' % param)

    def write_results_passed(self, param):
        with open('D:\\workspace\\our_first_project\\test_results.txt', 'a+') as file:
            file.write('--------------------------\n'
                       '     case %s passed\n'
                       '--------------------------\n' % param)